slightly better handling of `file` command output

darcs-hash:20081129091033-b2873-6cba6fcd9785f36345cd1a453784b4c7fcd7e162