Prevent blob from being freed at end of if statement scope

Was causing nonsense data to be read, tripping the blob size
check in Blob::CopyFrom
Fix wrong argv check for whether a backward pass should be done
Set phase to TRAIN when performing backward pass
Remove cudaSetDevice(1)

So it works when there is only one GPU
Merge pull request #221 from jamt9000/fix-dump-network

Fix dump network