Don't read file twice in sanitized_file

This can cause excess extra traffic and memory usage, especially with
fog. Also remove what seems to be a useless read in the if block and
added some initial specs for sanitized_file.