improve path resolving when folder contains ext

Fix the issue i'm having when require a file that lives in a folder that contains an extension

for instance: [..]/components/amasad-howler.js/howler.js