Improving code quality of C++ add-on

[Source](http://codereview.stackexchange.com/questions/28455/c-class-needs-a-very-critical-review)

- [x] path as static class constants
- [x] use std::string over char
- [x] use iostream over unistd.h
- [x] use `std:runtime_error` and `std::logic_error`
- [x] find alternative to asprintf
- [x] do cpp int to string cast
- [x] move file open methods to constructor
- [ ] give pull request a final check