Fixes Error On Top Level Variable Assignment

Previously, errors would occur if the below code was run, as the
src/iprofile.jl assumed :(a = 2) was the creation of a function.
An equivalent test case is also added to test/iprofile.jl

@iprofile begin
a = 2
end