Use os.path.expanduser to detect home folder