Fixed unit test scripts + coverage

Tried to add more apps (others break).
"preprocessors" is now populated automatically based on the tested apps.
Added core unit tests for basename and dirname

Note that it doesn't work 100% like the PHP functions so the tests
have TODO comments to fix those core functions eventually.
Merge pull request #6969 from owncloud/tests-morecoverage

Fixed unit test scripts + coverage