added type check to autoloader fixes #1504
Merge remote-tracking branch 'cmodijk/master'
Make sure target-dir plays well with classmap and files autoload, for root and deps, refs #1550