Add SecurityManger / policy when running tests.

This commit adds a security manager to the test JVMs
that prevents mainly writing files outside of the JVMs
current test directory.