Modify script to accept "via-file" access method.

Chomping username and password to remove trailing newline characters.