Update backup.py

Moved notify import into the code under the try except for gui, to accomodate headless server installations. Removed an extra with open in the jobs run code for less io.