added basic ~ expansion

I added in tilde expansion, because typing `:o /home/user/documents/test.pdf` sucks.

Not sure if there's a more "C++-sy" way to do this (I'm more of a C guy), but this seems to do what I wanted.