fix path bug

Filenames should be relative to the directory in which the program resides.
fix again

See last commit.
improve readability