edited code in profile.py to return correct extension of picture