Hardening: Remove dangerous characters + Subdirectory Check

If an user is able to create folders in /core/l10n/ he is able to execute arbitrary code. Therefore I've added an `issubdirectory` check and removed all potential dangerous characters from `$lang`.
Merge pull request #7287 from owncloud/subdirectory-harden

Hardening: Remove dangerous characters + Subdirectory Check