The photos are stored on disk and info like title description are stored in the photo insert.
You have not provided me with your url here. Why would you be renaming a directory you should not have a directory 0 on the server. You can not upload to main because main can not contain photos.
Maybe thats your issue. You can upload to A Category.