Modified the operation of openfile().
The directory is now set to getcwd(), and any moving around in the file structure in the dialog by the user causes the current working directory to change (using chdir()).
Authored by: bugman 2010-01-26
Parent: [r10373]
Child: [r10375]