replace slashes by os.sep to be windows compatible