When CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR point to different locations (likely), the `gen_json_header` will fail due to the missing dir "./data" -- OUTPUT not being able to create the *.json.h filesExplicitly create dir "[build directory]/src/test/data".
Also fix a trivial Python issue -- seems the way to exit is `sys.exit(n)`Right now, `make check` will fail for "out-of-source build" -- OUTPUT not being able to create the *.json.h files. The error occurred on my env (a box running Mac OS X), also tested on a Ubuntu instance, same result. Creating the dir solves the problem.