XSLT 2.0 supports regular expressions, so you can write
<xsl:copy-of select="dir[matches(id, '^user:.*/work$')]"/>
Your example changes the namespace of all the elements, which the above transformation doesn't attempt: I wasn't sure that was an important part of your requirement or just something that happened by accident.
If you're constrained to use XSLT 1.0 it's a little more difficult because there are no regular expressions and no ends-with() function. You could change the predicate (the expression inside the square brackets) to:
starts-with(id, 'user:') and substring(id, string-length(id)-4) = '/work')
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference