Fixed issue #7, #6, #5 and #4. Also added check to see if file with duplicate name was already uploaded in same browser session.