fixes bugs due to the change from string classpaths to arrays

This pull request fixes two bugs.

1. the template classpath which was added to the arguments was wrong
2. the debug output was wrong, because the toString method of arrays returns the type and a hex string representing the hashcode
can you add a line-based comment on the reason behind the use of reflection (I guess it's for accessing a private method)