Fix posts rebake

This fixes 2 issues when rebaking posts
- [x] Move BBCode formating before Markdown conversion
- [x] Make sure we don't throw exception when parsing a bad URI