resolve for symlink as well as raw script