Improve array iteration performance

Store scalar of arrays in variables when using array length in for
loops.  This will improve performance slightly when dealing with large
arrays.
Allow wait-time for emails to be configurable

Allow the wait time for testing the presence of an email to be
configurable via the EMAIL_WAIT_TIME environment variable.  This is
useful for slow testing servers.
Ignore files generated by tagging programs

Ignore files generated by tagging programs such as etags and GNU Global.
While here, sort lines.