fix post model's permalink method so that it works when called outside the context of the post's blog