Introduce hashdir/4 function in ddfs_util.

This function is the same as hashdir/5 but does not return a URL.  It
should be used whenever we do not care about the url.
Prefer ++ operator over filename:join for critical sections.

Based on independent benchmarks ++ is much faster than filename:join,
and based on flamegraphs, we know that some of these filename:joins
were bottlenecks so they have been replaced with ++.
Merge pull request #445 from pooya/shayan/filename

Shayan/filename