properly parse stencil filename