Moved ex command expansion to parsing.

By the way the expansion for '~/' to home dir was added.