Done testing, fixed the seperatePathFromFilename function (it should be fixed anyway.