try to automatically fix leading and trailing slashes Signed-off-by: Nicola Murino <nicola.murino@gmail.com>