If you signed a contractor agreement then I think it sounds legal (not necessarily fair or nice, but legal ;) ). On your side, when you do your taxes you can file as self-employed / independent contractor and get those deductions.
I've been given the option before on contract jobs: I could be "employed" by them and receive benefits, leave, and holidays, or I could be a contractor and handle those details myself. Generally as a contractor you want to get paid more so that you can cover those additional expenses.
It sounds like they were not doing the right thing if you were working on-site full-time just like any other employee.
That said, the above post is correct--being self-employed should come with the appropriate adjustments. If you are in this situation again:
1. You should be paid extra because you're covering your own vacation, retirement, health insurance, and you're paying self-employment tax.
2. You should be paid for all hours of overtime. It's not a salaried job. Also, you have a right to set a price on overtime. You're in control as a self-employed person, and all things are negotiable.
3. In general, you have more leeway in refusing projects (of course, they can say "good-bye", but they had reserved the right to say that anyways).
4. You should be able to work for other people during this period except perhaps competitors.
In the past, you could buy group-priced health-insurance through the local small business group and get a tax deduction for it.