Feature/permissions field for resources

server and provisioner changes together

provisioner changes:
- [x] store permissions field in the resourcespec
- [x] set permissions when writing to data directory if specified
- [x] consider permissions when checking to see if resource is synced to datadir or not
typo, oermissions