The current working directory is used and changed if no directory arg is supplied to openfile().
Authored by: bugman 2010-01-26
Parent: [r10376]
Child: [r10378]