This changes make it more portable by removing bash dependency and not
using GNU-specific 'sort' syntax. Also this fixes issue with selected
image not being displayed first.
This includes the commands available in contrib/. It's enabled by
default.
I moved the manpage and desktop file to their regular locations to avoid
complicating the meson file too much. They won't be installed when you
disable the contrib commands.