expanduser for cert files