fixed loading of linked module and lib directory into classpath

Signed-off-by: Bartek Zdanowski <bartek.zdanowski@gmail.com>
Merge pull request #915 from zdanek/2.x

fixed loading of linked module and lib directory into classpath