Moving SQL Server Database Files to New Location - Why permission error?
The ALTER DATABASE MyDB MODIFY FILE (Name = MyDB, Filename = 'N:\DATA\MyDB.MDF') statement doesn't actually move the files.  It merely moves the definition of where the files reside.  You'd need to actually move the files manually before continuuing to step 4.

When you move the files prior to step 4, you must ensure the target directory has the correct permissions for the SQL Serve service account.  This document details the requirements.