fix save pages/templates (using subdirectories)