Fix permissions on repo dirs.
diff --git a/vars/functions.groovy b/vars/functions.groovy
index 1a82bb3..68a8979 100644
--- a/vars/functions.groovy
+++ b/vars/functions.groovy
@@ -14,7 +14,7 @@
 
        mkdir -p .repo/local_manifests
        mkdir -p cache
-       chmod 777 cache
+       chmod 777 cache .repo/local_manifests
        """
 
     timeout(time: 20, unit: 'MINUTES') {