Jh output3

This is pull request of changes in output system. All commits in this branch are git cherry-picked from JH-output.
Rather have this->_base_filename just a string not pointer to string. Same case  this->_data_filename.