Fixes #4080, FileHelper::removeDirectory() symlinks handling enhancements

Fixes #4080:

1. Added proper handling and support of the symlinked directories.
2. Added $options parameter.
shouldn't this check be made before and exit directly? otherwise you would delete everything inside and not remove the dir because it is a link.