Stop enumerating file system if favicon is found

This changes the enumeration of files to stop if a favicon is found. Fixes #1351