Correct user's home directory detection (windows compatibility for ruby >= 1.9.3p362)

We could use Dir.home instead of this code, but it will not be compatible with old rubies.

(For ruby >= 1.9.3p362 on windows `File.expand_path '.ruby-uuid', '~'` will return `"C:\\current\\app\\path\\~\\.ruby-uuid"`)