The tilde path is an asp.net construct that represents the root of the currently running asp.net application. It has no meaning outside of the asp.net context -- Directory.GetFiles doesn't know how to work with it. GetFiles does know how to work with a regular filesystem path. So the question becomes: How do we translate the asp.net relative path to one GetFiles can work with. The answer is HttpContext.Current.Server.MapPath.
I'm not near my webserver right now, but something like
var serverPath = HttpContext.Current.Server.MapPath("~/Pictures/");
var files = Directory.GetFiles(serverPath);
should get you started.