samba-tool: Use same method for removing trailing $ as elsewhere in the tool