Ensute Library directory is created.
Correct minor bugs.