improved the build system to change to the right direcory if it recognises a lib / spec structure