Juggle the fd and fp properly to avoid a memory leak.
adding test continualtest.sh
Merge pull request #104 from pantheon-systems/memleak-master

remove fdopen memleak to curl