Fixed bug where we'd get invalid directories and files after a factory reset. Also updated to latest Bipolar conversion code.