added better library directory structure

The building system has been changed to make including and
using the library in other projects easier.