added dir permission checks to install