changes filename to correct file extension