Modified build script to run in Vagrant and Ticket #548

I have modified the build script to use sh command so that it can
also be run in the Vagrant environment. The exact same modification
has already been made in the dev branch.

I have also implemented the minor enhancement of Ticket #458 to have
the event template list in the events add/edit page to be sorted,
so that users can find their desired template more easily.