Do no generate empty prefix

Introduced by #414, generates empty prefix if prefix is `/`.