Break the logic that finds files to delete into it's own method for easier unit testing

Setting up for #32
Fixes #32, where similarly named source images could get deleted during a delete()