fixed some bugs in the way it got the folder separator