Fix handling of output paths containing spaces.