polishing, bugfixing

- pre-build script for linux/bash
- sleep bug for g++-4.7