My modifications

I've made some improvements in the code:

1. I've fixed the bug with the arguments;
2. Replaced getopt with argparse, which is easier to code, more dynamic and have better messages;
3. Changed the code of the CL arguments;
4. Made the code conform with PEP8 style (you might not like the new indentation, but I think it's easier to read).
5. Added more special characters;
6. Replaced some functions with better ones (in my opinion).