Not going too far into details, see for example :
http://en.wikipedia.org/wiki/Cauchy's_integral_theorem1) If Gamma is included into Omega, a simply connected open subset of the complex plane without zero, then f(z) = 1/z is holomorphic on Omega, and you can use Cauchy's theorem .
The idea is that, following the path of gamma, you don't make a whole turn around zero.
2) Since gamma doesn't contain any negative real number, you can consider the principal definition of the complex logarithm (where Log (1) = 0) and write z^i = exp ( i. Log(z) ).
This shows that f(z) = z^i is holomorphic in a simply connected open subset of C.
For example, you can use the open disk Omega with center z2 = pi^3 +1 and radius R = pi^3 + 1/2
Thus, z^i have primitives functions on Omega.
Precisely, F(z) = (i/(i+1)).exp ( (i+1). Log(z) ) is a primitive of f.
In a more simple form : F(z) = z^(i+1) / (i+1)
Thus, your integral over gamma is F(z2) - F(z1), with z2 = (pi^3 + 1) + i sin(pi) = pi^3 + 1 and z1 = (0^3 + 1) + i sin(0) = 1
Integral = [ (pi^3 +1) ^ (i+1) - 1 ] / (i+1) = [ (pi^3 +1).Exp(i.ln(pi^3+1)) - 1 ] / (i+1)
I hope it will help.