preg_replace to remove full path prefix

Use preg_replace to only replace the first instance on a full path to
make it local
Avoids str_replace replacing all instances in the string