Fixed path/to/dir bug