fix issue with directory permissions and add a call to apt-get update