A few improvements to the htmlunit version

Although I ported it to selenium in the 'selenium' branch, because I could not find a way to upload multiple images using htmlunit.