Add cookie module.
Add mkdirp to create download dir.
missing module fix.
Format and remove whitespaces.