Put an absolute path in the email script and cleaned up an unused loop