Fix WritePackedQuaterion() always returning false. Closes #581.