Report previous exceptions
Make `require` conform to node's behaviour except for the following cases:
- a file with the same name as the required folder's name will be used
- if only one file exists in the required folder then that will be used
Improve error reporting
Use a queue for processing dependencies rather than recursive functions