Fixed folder handling for windows with spaces in filepath