Files: fix the order fileactions are computed for a file

Without this, an action registered for 'text' will overwrite an action registered for 'text/foo'

cc @DeepDiver1975 @karlitschek