Read package.json correctly when it starts with '..'

Fix #627