templatefilters: add new stripdir filter
Adds a new template filter for removing directory levels from a
string. Examples:
{foo|stripdir} -> 'foo'
{foo/bar|stripdir} -> 'foo'
{foo/bar/more|stripdir} -> 'foo/bar'
{foo/bar/more|stripdir|stripdir} -> 'foo'
adding a
adding b
adding c
% should succeed
200 Script output follows
/al/
/b/
/c/
200 Script output follows
a
200 Script output follows
b
200 Script output follows
c
% should fail
404 Not Found
error: repository circle not found
404 Not Found
error: repository circle not found
404 Not Found
error: repository circle not found
% collections errors