build: fixed running build from external directory