Make sure we don't import files until they have finished uploading (Fixes: #314)