Pushes the scripting logic into a standalone script and adds tests for the applications which by side-effect also test the invoke and query functions on the chaincode. Signed-off-by: Brett Logan <brett.t.logan@ibm.com>