Expanding paths to allow relative and ~ notation