Use require.resolve for patch and setup paths. Improved argument validation tests.