Allow replacing http with https

Simple hack to allow replacing http with https in the resulting (short) url.
Also simple backwards replace in expand function in case https url is passed.

ToDo: If needed - do the same in extended return