Only prepend namespace to namespaceless classes
added tests for namespace prepending  #296
replace __CLASS__ for actual class name