Hi. I had, what I think is, a similar problem with my storage where it wouldn't let me download anything or even see the available storage after pratting around with USB mount storage in recovery.
I formatted the data partition through twrp, then rebooted which rebuilt the file system in data.
Then i wiped everything, inc system. Then 'adb push' a new ROM file to the data partition and flashed it.
Works fine now. I hope this helps. If what I'm saying sounds like it won't work please ignore.
Sent from my HTC One X+ using xda app-developers app