handling of mail binary in a more generic way

I had an issue on ubuntu 12.04 with exim installed where the mail binary is located in /usr/bin/ - so I made a minor change for executing mail