Note: this procedure requires an .img file that you will be required to create from the .iso file you download.
Download the desired file. Convert the .iso file to .img using the convert option of hdiutil
hdiutil convert /path/to/ubuntu.iso -format UDRW -o /path/to/target.img
Note: OS X tends to put the .dmg ending on the output file automatically.