Fix a bug in test_jansson.c and reshuffle compiling and copying scripts