Macbook Air keeps asking to shut down
I have a Macbook Air 13-inch, Mid 2012 and it's been working fine for the past 10 months. Yesterday, I installed mavericks and since then a notification keeps popping up asking "Are you sure you want to shut down your computer now". There's also a box that asks if I want to reopen the windows when I log back in. There are four choices restart, sleep, cancel and shut down.
I notice that keeps repeating every 5 seconds when I'm not touching any keys or the trackpad. I downgraded with a clean install to OSX 10.8 but this problem keeps occuring. I doubt it's a hardware problem because I only used the laptop while in bed the night before and was perfectly fine.
I started the system in safe mode, restting the SMC and same thing keeps repeating.
I scheduled an appointment to go to the Apple store but I won't be able to go in until next week. I use this laptop for school so any advice will be greatly appreciated.
MacBook Air, OS X Mavericks (10.9)