Spin-wave edge modes in finite arrays of dipolarly coupled magnetic nanopillars