The <?php echo $pg_config['path']; ?> part in the index.php should remain as is, there is not need to update it. As neilo stated, you only need to copy the gallery folder and can leave those above lines of code as is. In your copy you can then update the gallery.js with your updates and any css as needed.