more file io refactoring

Removes more references to static working directory.

@osa1 @radumereuta Please review
This seems very specific. What is it? Is it portable?