I use 2 different methods when building a site.
I create a folder on the domain called 'test' and put everything in there and use that. As for the index page I call that 'index_test.htm'
When i am happy and want it to go live, I just change the name to index.htm and the folder to whatever, usually I call it 'main'.
The other method i use, especially when i am wanting to test scripts (mainly php), I use something called uniserver. This is a great bit of software that you download. What it does is create a server environment on your pc. It has apache, php, mysql,etc all built into it.
http://www.uniformserver.com/