test pushing a new file
Fixing get_file_lastmodified of non-existing file

Checking $? did not check the status of curl, but of grep and local.
Calling these separately allows checking for a failed curl command. E.g.
when the target file does not exist.