Check if file exists to avoid trying to delete a non-existent file. Fixes GH-23.