libs/sys: properly handle passwords with apostrophes