Cache-clean should remove links pointing to nonexistent folders (Fixes #182)

Fix for issue #182.

Change the code a little bit. Remove the cache and the links in parallel.
Also add some tests regarding the issue title.

Just let me know if I need to organize the code in a better way.