LPS-31889

LPS-31889 - Documents and Media portlet root folder permission is set differently depending where the portlet has been accessed on first time.- tested and refactored against LPS-31889,LPS-29743 and LPS-25398