firefox, chrome: making configurable server option more robust

Before this commit, if varnam server version ends with a /, then it used
to fail. This commit handles it in a safe way.