Serialize before save in define_url

See issue: https://github.com/markevans/dragonfly/issues/236