decode path byte string

without decode(), path.endswith(alternative) will throw an exception, making the which lookup fail