Also filter out trailing slashes when processing output