Fix regex to work on OSX's file(1)