Consider the following question:

I am aware that we can do the following:
Then we can change the x values to z and integrate around a semicircular contour.
However If we look at the exponent and see that it is negative value (i.e. k is a positive value) then we have to use a contour that is in the negative y axis and if we have an exponent that is positive (i.e k is is negtive) then we need to use a contour that is oriented in the positive y.
I am unsure as to why this is and could someone explain

What you say is true: when integrating around a semicircular contour we must be careful with the sign a the exponent.
Why this is?
I denote by J the integral you want to compute to get your Fourier Transform.
When you pass in the complex domain, you define a path $\Gamma_R=I_R+C_R$ where R represents the radius, $I_R=[-R;R]$ and $C_R$ is the semicircular joining $z=-R$ to $z=+R$.
You want to have something nice and simple for your integration when passing to the limit $R \rightarrow \infty$, that is :
$$ \oint_\Gamma f(z) dz = 2\pi\sum Res(f) = \int_I f(z) dz = \int_\mathbb{R} f(x) dx =J $$
But wait : you should also have
$$ \oint_\Gamma f(z) dz = \oint_{I+C}f(z) dz = \int_{I}f(x) dx + \int_{C}f(z) dz $$
So, you have your nice result only if $\int_{C}f(z) dz = 0 $
For this to be true, a sufficient condition would be that, as $R \rightarrow \infty$, then $|\int_{C}f(z) dz | \rightarrow 0$, and the second integral (the one over the semi-circle) would disappear and you would have only $J =\oint_\Gamma f(z) dz = 2\pi\sum Res(f)$
And for this result to be true (you can check by yourself) you have to bound your exponential term: ie, its argument has to be negative. This is why you must choose the correct semi-circle.