Fixed bugs with path names

Fixed bugs with path names to handle network paths and paths containing
spaces.