all references to directories now use path.join
fixed bug in previous commit
fixed a crash