fix #586
added test case
added test to CMakeLists.txt
Enabled ctest for cdat-travis
Updated travis to run ctest