The ~.tran folder is created to assure consistency of the transaction.
When you invoke import, the ~.tran folder is created with data of your current workspace.
All physical operations are performed on this folder and when everything succeeds, its content is moved to the current workspace. The .tran file is used to mark the transaction state as finished. If the last move of data would be interrupted, the next start of jsreport would see the .tran file and repeat the move of the transaction data to the current workspace.
I'm not sure what is happening in your case. Would you be able to share with me what you have in the bucket and what are you importing?