Fixed a bug with a blank filename being set for the previous filename an...

...d appended the script's directory to sys.path to enable the use of project directories later.