Spawn a new thread for upload/download

Created a new thread for both download/upload. Plugin is responsive now.

Also, solved the bug in the part where plugin opens the file
downloaded/uploaded.