Util function for getting the currently deployed directory name.
Cleanup of old deployments implemented and in rough working condition.