Only run chmod/chown for local files

When the /opt/stack directory is NFS mounted, chown to
the local user might not work. Create safe_chown and
safe_chmod functions that do nothing on NFS filesystems
to avoid spurrious errors.

Change-Id: Iaa68879e867a4426b1990d4d46164769177dc7cc
Merge "Only run chmod/chown for local files"