Re-implement bin/+x in Perl

Perl can be installed anywhere and is much more comfortable tool for
writing scripts than shellscript.