Strip leading path separator characters in a portable way.

Addresses the situation where get_id() ignores root_dir and always
looks for minion_id in /etc/salt/minion_id.

Fixes 10035