Update main.py

Simplified reference names of raster files outputted to outputspecs text files; use file names instead of paths. 
Also inserted condition for previous files existence for deleting templatetempras