For some reason, it would seem that by default your IIS does not allow access to your bin folder. This is probably inherited from the parent site above your virtual directory. Regardless, see this link for FileIO with medium trust:
http://msdn.microsoft.com/en-us/library/ms998341
, web.config, AppDir, / .
<IPermission
class="FileIOPermission"
version="1"
Read="$AppDir$"
Write="$AppDir$"
Append="$AppDir$"
PathDiscovery="$AppDir$"
/>