fixed trailing dir slash when using slug

See testcase, dir + slug contained double slash when dir had a trailing
slash.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>