Getting the correct libdirs

Changed how libdirs are resolved for generating API docs with
the new bin folder hierarchy.