Better basename extraction.