Free the globs
Function declaration prototype thing
Minor change to the chdir()-ing
Apparently ints have to be set to zero
rename save_file -> save_screenshot, because we can upload actually existing non-image files as well