Move filetype detection to separate method

It eases testing (and puts less burden on API)
and makes the logic easier to manage.
Test no warnings on filetype detection

since that was the reason for these changes (to clean up the log).
Don't warn on undef mime type

since that was probably the source of the warnings in the first place.
Also show "sample" files in release info
Sort by path after documentation

so that scripts (without =head1 NAME) are sorted.