Whether you or the previous owner put it up without a permit does not matter. The fact is that you are not going to have any problems until you sell it. Then, let the games begin. You raise a very interesting question. The answer is, don't be looking for the very bottom.
Interest rates are very low right now.
While conceivably they could go a tad lower, they could also go higher in a heartbeat. Whether you should refinance depends on the mortgage interest rate you are currently paying. If you can decrease it by more than a point and a quarter, I would say the time to move is now. But there are two or three variables here when deciding what kind of new mortgage to get. If you are going to be here for a long time, it would make sense to pay 2 or 3 points and get that rate pulled down as low as possible.