Rewrote using GNU getopt

 Author:<jescamilla@hushmail.com>