ensure null/empty contentPrefix handled. remove endless loop.

Since we already were using StringUtils for this class, I simply
reused it again to create the full content path. The idea here
is to strip the / from the end of the contentprefix and from the
beginning of the content path. Then use a single prefix.