Call rstrip to delete trailing slashes if present