[Clean] Strip leading path separator characters in a portable way.

Picking #10036 on to develop.  Original author and all credit to @plastikos
Origin: https://github.com/plastikos/salt/commit/c92af969f789a2f0c6fa74bb1ee69a122549a53f

Original PR message:
> Addresses bug where ROOT_DIR was discarded and salt.config.get_id() only looks in /etc/salt/minion_id.