Do no generate empty prefix

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