Additional fix for spaces in paths

Updated the script to work with spaces in paths