Added url_encode_stream function
Fixed some getopt bugs