fix bugs around load path for libraries.
Merge pull request #1 from smoriwaki/master

fix bugs around load path for libraries.