Convert ~ path to full one.

This is to fix issue when user is using ~ in the location.
Some minor comments changes