Three years ago I was a freelancer and due in September, so here is my 1.5 cents:
I had one project offered to me that I ended up declining because it encompassed my due date and that was irresponsible.
I had another project that ran up to my due date, I told them when my due date was and they didn't flinch. That gig ended up being very lucrative and I am grateful that they gave me the project despite my due date.
I had other steady contact work that I worked up to my due date, took a few weeks off from and then resumed several weeks later, but at a much slower rate.
Take aways: I regret having to work the first week of my son's life. I have never been so exhausted. It would have been nice to have had at least 1 week, maybe 2, of just laying on the couch and recovering. Giving birth is exhausting.
You never mention what your freelance work is, but if you can work from your couch, then you can resume after a week or two. If you have to work outside the office, it gets a little more complicated.
Working from home with a kid is one of the hardest things I have done. They want your attention ALL THE TIME. Don't envision yourself getting a ton of work done with them in the house because they will literally pull on your leg while you're typing on your computer. My son now literally closes my computer while I am typing on it.
Ignore the "if you can afford to stay home...." BS. You know if you want to be a SAHM. Don't feel guilty if the thought of spending your entire day with a baby/toddler sounds mindnumpingly boring. It is ok to pay someone else to entertain your child, even if you are paying them almost as much as you are making. My son loves his babysitters and they have a lot of fun.
Back to the perm position: take the test, try to get the job, benefits are priceless. Even if you don't get maternity leave, they can't discriminate based on pregnancy and FMLA is still a thing. You just might have to take unpaid leave since it's such a short time and you likely won't have much leave saved up. You will learn a lot about the company and if you want to work with them based on if they hire a pregnant chick.
Also, my friend wrote a book that might help you. It's called Here's The Plan. She just wrote it and I have only read the first chapter, but I assume it will answer a lot more questions than you will get on this message board.