Update package.js

Hello! I found filepath not defined variable causing an exception and not registering available packages. Changed it by dir and all worked OK.
Merge pull request #1 from jaumeMR/patch-1

Update package.js,  use the correct var name