hdiutil convert/rsize resource temporarily unavailable When trying to convert or resize a dmg image I get the error:

hdiutil: convert failed Resource Temporarily Unavailable error


or

hdiutil: resize: failed. Resource temporarily unavailable (35).


(hdiutil error code 35).
The problem appears to happen when you unmount the image using umount. 

Remount the image (either using hdiutil attach or just double click the image) and use the command hdiutil detach it again. This will unmount and eject the image. 

hdiutil detach /Volumes/&lt;your image&gt;