refactor(scripts): make class loading compatible with grails 2.3.x
fix(scripts): remove test phase flag again after finishing test phase