Perl rewrite of ehits2vmd.sh from 2008-06-01
Rebase on master