Adjustments to the path detection and cwd for the command.