I wasn't sure what the actual preference name was so the code I gave you wasn't accurate. This is exactly what you need in the user.js file:
user_pref("sidebar.visibility", "hide-sidebar");
It didn't seem to work the first time I restarted Firefox even though the value for sidebar.visibility was changed correcty in about:config so I edited it back to always-show and then right back to hide-sidebar and now the sidebar remains hidden on startup
Edit: typo