fixed path handling with spaces