I tried to create dmg from folder using hdiutil and diskutility , both time it failed creation for a particular folder name, when i change folder name it worked. The error i get is
could not access /Volumes/abc/abc.app - Operation not permitted
hdiutil: create failed - Operation not permitted
When i change abc to def it works.