When you detached the database - the files were probably modified and the permissions removed. This is a known issue with detaching a database - which causes the kinds of issues you are seeing now.
I am assuming that when you try to restore it is erring due to the mdf/ldf files that already exist - and the system cannot overwrite the files even when you use the option to overwrite. If that is the case...it is due to the permissions left over on those files after detaching.
You can manually move or delete the mdf/ldf files for the old database - and then the restore should work. Just to be safe - I would move the files to a safe location and only delete them after you have restored the database, but since you are planning on restoring from backup anyways there shouldn't be any issues with just deleting those files.
The other option would be to reset the permissions on the files - once those have been reset you should be able to attach or restore as needed.