use relative path for siteconf in case of space and update relevant tests
simplify logic
Merge pull request #949 from stan3/dir_with_space2

quote siteconf path in case of space and update relevant tests