Python scripts enhancements:
- Added MySQL support (optional)
- Autodetect number of CPUs
- polish code and minor refactoring
- uses of os.devnull