Changes Dir.home -> File.expand_path('~')

Dir.home is not available on ruby 1.8.7 i.e.
versions of OSX before Mavericks
Merge pull request #5222 from mindriot101/fix-xquartz-install-on-1.8.7

Changes Dir.home -> File.expand_path('~')