Add sanity check to file md5

Turns out md5_file explodes if the file doesn't exist. This adds a guard around the call to ensure that the file exists before trying to hash it.