Cra 505 CRA-715: Fixed writing of wavelets to allow any padding size.