Reorganize files to improve portability

* Added checks on environment (available commands)
* Reorganized Python code
* Count 'msgids' from msgattrib instead of parsing 'msgfmt --statistics"