I understand what you are asking.
the problem is that your testing environment contains a sub directory:
whereas the live server does not:
any subdircetory on the end of the domain name will be added to the image paths:
so if your site is at:
the image paths will be:
the way around this is to use a sub domain, rather that a sub directory, for example
most hosts will offer around 50 sub domains for any one main domain.
by using the sub domain, the paths for the testing server become consistent with the paths on the live server.