Fix Bug When Scripted Objects Taken To Inventory

Script variables where not updated when the prim was Taken to inventory
because delete was called before take. Switched these around and now
works correctly.