Fix #341 sourcing .profile not found

Closes #341