Modernizr crashes on Firefox with hidden iframe

On Firefox, with hidden iframes, matchMedia returns null, thus trying to access .matches crashes things. Added extra check to make sure we stay
up and running. Also, added .project to gitignore