Update mkcube.py

- A 'main' function was created to organize better the code.
- Code reorganized according to PEP 8.
- Inserted 'from __future__' statement.