Finish tests for _uploadChunk and fix an issue with the Ajax class