Enhance: idb
Fix: Processing of cache directory

In case of trailing slash/backslash, rtrim() will be applied.
Conditions for prepending the cache directory are summarized in one if
clause.