In your code it looks like you're assuming the value is just "files", and you're updating it to contain just that in index.php. Shouldin't the default just be "files"? Then you can eliminate the changes in index.php. We should probably add instructions in the config comments to omit the leading and trailing slashes in both paths.