Make it a little bit more convenient filling-in where libmagic lacks a bit.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Fix typo in the directory name. Doh.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Add more tests and improve some existing ones.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>