Improve trackperlvars perl file detection and cleanup