Properly handle whitespace in script paths