cli: Changed home directory finding function to fix paths on MSYS/Cygwin.

Without this change, .flynnrc would end up in the current working directory. Not testable due to being platform-dependent.