Support scala libraries

I still don't have a solution for handling the library directories
correctly, but this at least manages to support some form of
libraries.