Better favicon handling

Based on http://www.jonathantneal.com/blog/understand-the-favicon/