Added `withExtras` method to allow for custom dir prefixes.