Refactors read from file operation. Handles home ("~") path in OSX
Refactors read from file operation. Handles home ("~") path in OSX

TamasNo1/pgcli,n-someya/pgcli,darikg/pgcli,janusnic/pgcli,johshoff/pgcli,koljonen/pgcli,darikg/pgcli,dbcli/pgcli,joewalnes/pgcli,johshoff/pgcli,janusnic/pgcli,yx91490/pgcli,dbcli/vcli,zhiyuanshi/pgcli,suzukaze/pgcli,w4ngyi/pgcli,joewalnes/pgcli,d33tah/pgcli,n-someya/pgcli,w4ngyi/pgcli,suzukaze/pgcli,d33tah/pgcli,TamasNo1/pgcli,dbcli/vcli,dbcli/pgcli,lk1ngaa7/pgcli,lk1ngaa7/pgcli,koljonen/pgcli,yx91490/pgcli,zhiyuanshi/pgcli