Eliminated a race condition in upload() method (with async.map).
Eliminated some blocking code in getFileInfo() method (statSync).