public static string StripSurroundingSlashes(string target)
{
if(target == null)
throw new ArgumentNullException("target", "The target to strip slashes from is null.");
if(target.EndsWith("/"))
target = target.Remove(target.Length - 1, 1);
if(target.StartsWith("/"))
target = target.Remove(0, 1);
return target;
}