Generalized and fixed UploadField handling in behat