Handle sed -E/-r option

GNU sed uses -r to enable extended regexps.
Darwin sed uses -E.
Fix an off-by-1 error in filename_t::pop_back()

and write a test for it.
Fix tfilename test for Darwin

where /tmp is a symlink, which breaks the test.
Add filename_t::push_back()
Handle Darwin external .dSYM debug symbol files