Basename should use `".rb"` rather than `".*"` for extension, with a wildcard we risk running into unpredictable behaviour.