Fixed issues with handling of PATH containing spaces.