Rakefile: remove deprecated rake interfaces
fix assumptions broken by a newer libmagic

This makes all tests pass against libmagic 5.17, currently present in
Debian testing/unstable. At least this version will be the one in the
next Debian stable release in ~1 year from now.
Merge pull request #3 from terceiro/libmagic-5.17

updates wrt deprecated rake tasks and libmagic 5.17