media mapping and static/public cache directory creation improvements.