refactoring of temp tmp dir document helper (tomcat only)

Change-Id: I133f165e8a2a62b9ddd8b2fe555fff011ce0eddb